package com.changgou.web.gateway.filter;

public class URLFilter {
    public static String filterPath = "/api/wxpay,/api/wxpay/**,/api/worder/**," +
            "/api/user/**,/api/wcart/**,/api/worder/**,/api/cart/**,/api/categoryReport/**," +
            "/api/orderConfig/**,/api/order/**,/api/orderItem/**,/api/orderLog/**," +
            "/api/returnCause/**,/api/returnOrder/**,/api/video/**,/api/module/**," +
            "/api/category/**,/api/course/**,/api/search/**,/api/webPage/index,/api/webPage/courseList";

    public static boolean hasAuthorize(String url) {
        String[] split = filterPath.replace("/**", "").split(",");
        for (String value : split) {
            if (url.startsWith(value)) {
                return true;
            }
        }
        return false;
    }
}
